// ActionScript file
import mx.collections.ArrayCollection;
import mx.controls.ComboBox;
import mx.events.DropdownEvent;
import mx.resources.ResourceManager;
[Bindable]
private var langs:ArrayCollection=new ArrayCollection([{label:"简体中文",data:1},{label:"English",data:2},{label:"繁体中文",data:3}]);
private function init():void
{
	this.cmbLangs.addEventListener(DropdownEvent.CLOSE,cmbLangs_changeHandler);
	changeLocale("zh_CN");
}
private function cmbLangs_changeHandler(event:DropdownEvent):void
{
	var cmbLangs:ComboBox=event.target as ComboBox;
	switch(cmbLangs.selectedItem.data)
	{
		case 1:
			changeLocale("zh_CN");
			break;
		case 2:
			changeLocale("en_US");
			break;
		case 3:
			changeLocale("zh_TW");
	}
}
private function changeLocale(locale:String):void{     
	// 修改语言                      
	resourceManager.localeChain=[locale];
} 